package com.xlx.openLink;

import com.xlx.openLink.base.BaseUtils;
import com.xlx.openLink.base.SnmpException;
import com.xlx.openLink.snmp.imp.SNMPAPIImpl;
import com.xlx.openLink.snmp.utils.SNMPUtils;
import com.xlx.openLink.uitls.Commuitls;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

@Slf4j

public class DevAbout {


    public static void main(String[] args) {
        //System.out.println(Commuitls.ping("192.168.2.135"));
        //        //String str = "52:65:61:6c:74:65:6b:20:55:53:42:20:47:62:45:20:46:61:6d:69:6c:79:20:43:6f:6e:74:72:6f:6c:6c:65:72:00";
        //        //
        //        //System.out.println(SNMPUtils.convertHexToString(str.replace(":","")));
//        double s = 100.00;
//        System.out.println(BaseUtils.getMemery());
//        System.out.println(BaseUtils.getCpuLoad());
//
//        List<String> list = Arrays.asList("1", "2");
//        Iterator<String> it = list.iterator();
//        while (it.hasNext()) {
//            System.out.println(it.next());
//        }
//        while (it.hasNext()) {
//            System.out.println(it.next());
//        }

        BigDecimal bigDecimal = new BigDecimal(17875581);
        Double d = Double.valueOf((1024 * 1024 * 8) );


        System.out.println(bigDecimal.divide(BigDecimal.valueOf(d), 4, RoundingMode.HALF_UP).doubleValue());
    }


}
